-
Notifications
You must be signed in to change notification settings - Fork 303
[Object Detection] Add DETR Backbone, Object Detector, Preprocessor and Weight Conversion #2043
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
@DavidLandup0 , Any update on this PR? |
Picking it up now that a couple of other things are out the way - should have a more concrete update soon :) |
| return self.converter.convert_tokenizer(cls, self.preset, **kwargs) | ||
|
|
||
| def load_image_converter(self, cls, **kwargs): | ||
| # Check if the converter has an image converter conversion function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this for backwards compatability - looks like we just didn't have a way to return the image converter so far, unless I missed it from another model.
This way, any convert_x.py that has convert_image_converter() method can return that image converter too.

Adds DETR backbone, object detector and preprocessor.
DETR Elements
Preset Loader
To enable the
from_preset()convention, we also convert theDETRImageConverterparameters, but it looks like the method so far has just returnedNonewith a TODO for PaliGemma. In this PR, I've added aconvert_image_converter()method toconvert_detr.pyand updated the general preset loader to check if a specific implementation has the method and returns the class if it does for backwards compatability.